package com.chen.time.triggers;

public class MouseTriggerEvent extends TriggerEvent {
    public static final MouseTriggerEvent ENTER = new MouseTriggerEvent("Entered");

    public static final MouseTriggerEvent EXIT = new MouseTriggerEvent("Exit");

    public static final MouseTriggerEvent PRESS = new MouseTriggerEvent("Press");

    public static final MouseTriggerEvent RELEASE = new MouseTriggerEvent("Release");

    public static final MouseTriggerEvent CLICK = new MouseTriggerEvent("Click");

    private MouseTriggerEvent(String name) {
        super(name);
    }

    @Override
    public TriggerEvent getOppositeEvent() {
        if (this == MouseTriggerEvent.ENTER) {
            return MouseTriggerEvent.EXIT;
        } else if (this == MouseTriggerEvent.EXIT) {
            return MouseTriggerEvent.ENTER;
        } else if (this == MouseTriggerEvent.PRESS) {
            return MouseTriggerEvent.RELEASE;
        } else if (this == MouseTriggerEvent.RELEASE) {
            return MouseTriggerEvent.PRESS;
        }
        return this;
    }
}
